home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Collection of Tools & Utilities
/
Collection of Tools and Utilities.iso
/
basic
/
crsbas.zip
/
CROSSBAS.DOC
< prev
next >
Wrap
Text File
|
1990-12-01
|
44KB
|
1,085 lines
CrossBas Manual
Power-BASIC Cross-Reference List Creator
November 13, 1989 (1990)
(c) Lester L. Noll
CompuServe Id: 72250,2551
CrossBas.exe
version 1.00P
ContentsContents
1 Disclaimer . . . . . . . . . . . . . . . . . . 1
2 Copyright and Usage . . . . . . . . . . . . . . 1
3 Introduction . . . . . . . . . . . . . . . . . 1
4 Running CrossBas . . . . . . . . . . . . . . . 2
5 Command Line Options . . . . . . . . . . . . . 2
6 Changing Defaults File . . . . . . . . . . . . 5
7 The Summary Report . . . . . . . . . . . . . . 6
8 What CrossBas Does . . . . . . . . . . . . . . 8
8.1 Initialize . . . . . . . . . . . . . . . . 8
8.2 InitScreen . . . . . . . . . . . . . . . . 8
8.3 ReadCmdLine . . . . . . . . . . . . . . . 9
8.4 OpenFiles . . . . . . . . . . . . . . . . 9
8.5 CalcFileNames . . . . . . . . . . . . . . 9
8.6 ReadDefaults . . . . . . . . . . . . . . . 9
8.7 CheckStringSpace . . . . . . . . . . . . 10
8.8 CalcWordArraySize . . . . . . . . . . . 10
8.9 PrintScreenTop . . . . . . . . . . . . . 10
8.10 ReadAndParseData . . . . . . . . . . . 10
8.11 PrintScreen1 . . . . . . . . . . . . . 10
8.12 Compare . . . . . . . . . . . . . . . . 11
8.13 PrintScreen2 . . . . . . . . . . . . . 11
8.14 Sort . . . . . . . . . . . . . . . . . 11
8.15 PrintScreen3 . . . . . . . . . . . . . 11
8.16 PrintList . . . . . . . . . . . . . . . 11
8.17 PrintReportBtm . . . . . . . . . . . . 12
8.18 PrintScreen4 . . . . . . . . . . . . . 12
8.19 End Routines . . . . . . . . . . . . . 12
Appendix A CrossBas Files 13
Appendix B Modification History 15
Appendix C Power-BASIC Reserved Words 17
i
ii
FiguresFigures
Figure 1: Summary Report Example . . . . . . . . . . 8
iii
CROSSBAS.DOC CrossBas Manual page 1
1 Disclaimer 1 Disclaimer
Hear ye, hear ye! Be it known that the author hereby
disclaims all warranties expressed or implied as to the quality
or performance of this program. The author will not be held
liable for any lost profits, lost savings or any other direct,
indirect, incidental or consequential damages resulting from the
use of this program. Your use of this program constitutes your
agreement to this disclaimer and your release of the author from
any form of liability or litigation. (Really gives you
confidence, huh?)
2 Copyright and Usage 2 Copyright and Usage
This program, as well as its accompanying files and
documents, is copyright by the author, Lester L. Noll. You are
free to use and distribute it as you wish as long as you charge
no payment, either money or otherwise, for it. Also, you must
keep all the associated files together. The files are listed in
Appendix I. Use PKUNZIP to unarchive.
If you have any questions, comments or suggestions about
this program, feel free to contact me at CompuServe:
Lester L. Noll
[72250,2551]
3 Introduction 3 Introduction
CrossBas will scan a Power-BASIC source file and create a
cross-reference table of variable names, labels, procedure and
function names versus the physical line numbers where those names
occur.
To do this we must first read in all words in the file. We
can skip text to the right of "REM" statements or "'" remark
identifiers; text to the right of "DATA" statements; text between
quote marks; numbers; and operators.
After the program words are read in, we compare them with
Power-BASIC reserved words and metastatements. We keep only
those that are not Power-BASIC words.
Finally, we alphabetize the remaining words and print them
out, one word to a line, followed by the physical source file
line number(s) where these words are found. The list is sorted
without regard to case.
CROSSBAS.DOC CrossBas Manual page 2
We print the list to an ASCII file and allow the user some
control over its format. You may either print it to your printer
using the DOS PRINT or TYPE filename.ext>PRN commands or you may
use a print program such as Norton's LP.
At the end of the file is a summary report showing
processing times, number of words processed and a few
calculations that may be helpful for customizing CrossBas to your
own programming characteristics.
4 Running CrossBas 4 Running CrossBas
Run CrossBas from the DOS command line. There is no
interactive mode. If you enter "CROSSBAS" with no command line
parameters, CrossBas will print a short message showing proper
syntax and the optional switches.
5 Command Line Options 5 Command Line Options
The only required command line parameter is the input file
(source file) path/name. The output file path/name and switches
are optional. If no output file is entered, I append ".cb" to
the input file name to create an output file name. If a file
having the same name as output file already exists, I write over
it -- so be warned.
Command line options can be entered in any order. In fact,
the only rule is that the input file path/name must be entered
before the output file path/name. You may enter switches, one
after the other, without separating spaces. If, however, you
enter a switch before a file path/name you must leave at least
one space between the file path/name and the preceding switch.
Syntax:
crossbas infile[.ext][outfile][.ext][/bw][/p][/u][/s][/l:n][/w:n]
Switches:
/bw Set screen colors to black and white.
/p Paginate output file and print page headers.
/u Print variables to output file in upper case.
/s Print the list to the screen as well as to file.
/l:n Set the printer left margin to n columns.
/w:n Override CrossBas' word array dimension calculation.